package cn.itutu.demo.log4j;


import org.apache.log4j.Logger;

import java.io.IOException;
import java.sql.SQLException;

/**
 * Created by yujia on 2018/4/13.
 */
public class log4jDemo {
    //     获取根日志记录器
//    public static Logger rootlog = Logger.getRootLogger();
    //     获取日志记录器（类名）
    public static Logger logger = Logger.getLogger(log4jDemo.class.getName());

    public static void main(String[] args)
            throws IOException, SQLException {

        logger.trace("log4j:Trace Message!");
        logger.debug("log4j:Debug Message!");
        logger.info("log4j:Info Message!");
        logger.warn("log4j:Warn Message!");
        logger.error("log4j:Error Message!");
        logger.fatal("log4j:Fatal Message!");
    }


}
